<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/6/1 0001
 * Time: 下午 2:24
 */
header("Access-Control-Allow-Origin:*");
    if(!empty($_GET)){
        $num = $_GET["pronum"];

    $conn = new mysqli("127.0.0.1","root","","cart");
    mysqli_query($conn,"set names utf8");
    //print_r($conn->connect_error);
    $sql = "DELETE FROM cartlist WHERE pronum = '".$num."'";
        $sql1="SELECT * FROM cartlist";
    $result = $conn->query($sql);

        if($result){
            $arr = array("status"=>"1","msg"=>"delete success");
           print_r(json_encode($arr));
        }
    $conn->close();
    }